<template>
  <div>
    <Header></Header>
    <!-- 展示一级路由组件 -->
    <router-view ></router-view>
    <Footer v-show="!$route.meta.isHidden"></Footer>
  </div>
</template>

<script>
import Header from '@/components/Header';
import Footer from '@/components/Footer';
export default {
  name: 'App',
  // 注册组件
  components: {
    Header,Footer
  },
  data() {
    return {

    }
  },
  computed: {

  },
  methods: {
    getCategoryList(){
      this.$store.dispatch('getCategoryList');
    }
  },
  mounted(){
    //dispath给action，修改vuex数据
    this.getCategoryList();
  }
}
</script>

<style lang="scss" scoped>
</style>